package com.meritdata.cloud.data.service.development.controller;

import com.meritdata.cloud.data.service.development.model.DataApiCategory;
import com.meritdata.cloud.data.service.development.service.IDataApiCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@RequestMapping("/apicategory")
@Controller
public class DataApiCategoryController {

    @Autowired
    private IDataApiCategoryService service;

    @RequestMapping("/tree")
    @ResponseBody
    public List<DataApiCategory> tree() {
        return service.tree();
    }
}
